package nl.xvr.webserver;

import java.io.IOException;
import java.net.ServerSocket;

public class WebServer
{
	
    public WebServer(String webroot) throws Exception
    {
        ServerSocket sockListen = null;
        try {
        	sockListen = new ServerSocket(1080);
        } catch (IOException e) {
            System.err.println("Could not start server: " + e);
            System.exit(-1);
        }
        
        while (true)
        {
        	new RequestHandler(webroot, sockListen.accept()).start();
        }
    }
}
